<section class="wrapper">
  <!-- page start-->
  <div class="row">
    <div class="col-lg-12">
      <section class="panel">
        <header class="panel-heading">
          查 看&nbsp&nbsp <a href="/admin/articles/<%= @article.id %>/edit"><button class="btn btn-info" type="button">修改</button></a>
        </header>
        <div class="panel-body">
          <form class="form-horizontal adminex-form" >
            <div class="form-group">
              <label class="col-sm-2 col-sm-2 control-label"><i class="bi_tian">*&nbsp</i>标题</label>
              <div class="col-sm-10">
                <input type="text" name="title" value="<%= @article.title %>" class="form-control" placeholder="请输入标题">
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 col-sm-2 control-label"><i class="bi_tian">*&nbsp</i>摘要</label>
              <div class="col-sm-10">
                <input type="text" name="abstract" value="<%= @article.abstract %>" class="form-control" placeholder="请输入摘要">
              </div>
            </div>
            <input type="text" class="show_content" hidden value="<%= @article.content %>">
            <div class="form-group">
              <label class="col-sm-2 col-sm-2 control-label"><i class="bi_tian">*&nbsp</i>内容</label>
              <div id="editor" class="col-sm-10">
              </div>
            </div>
            <div class="form-group">
              <label class="col-sm-2 col-sm-2 control-label"><i class="bi_tian">*&nbsp</i>状态</label>
              <div class="col-sm-10">
                <input type="text" value="<%= get_dict(:status)[@article.status.to_s] %>" class="form-control">
              </div>
            </div>
          </form>
        </div>
      </section>
    </div>
  </div>
</section>
<% content_for :js do %>
  <script type="text/javascript" charset="utf-8">
      window.onload = function () {
          var content = $('.show_content').val();
          $('#editor').html(content);
      }
  </script>
<% end %>